1. Field of Invention
The invention relates to a method of data compression and decompression, especially the compression and decompression method of digital image data.
2. Related Art
Data compression is a well-known topic. Compression usually means to convert some given data to a different format that takes less space. Transmitting compressed data decreases the transmission time dramatically; storing compressed data also decreases cost. When the original data is needed, a decompression method is used to restore the data to its original condition. There are two types of compression: reversible compression (zero-distortion, zero-error coding or redundancy coding), and irreversible compression (distortion coding or isentropic compression). Reversible compression looks at data as a combination of information and redundancy. It operates by following the principles to eliminate or decrease the redundancy; therefore is a reversible process. Some well-known reversible compression methods are Shanno-Fano Coding, Adaptive Huffman Coding and LZ77 Coding. The irreversible compression method not only eliminates redundancy, but also ignores some unimportant details. It has a better compression ratio, but unavoidably losses some information; it is also impossible to restore the data back to its original condition. Some examples of irreversible data compression are Predictive Coding, Block Truncated Coding, and Subband Coding.
The LZ77 compression method, for example, uses the previously read input data as a dictionary and uses a pointer for the data segment in the dictionary to replace the previously input data and achieve data compression.
The LZ77 compression method achieves a better compression ratio and is compatible with various text files (literal, binary system). However, it looks for matching word strings in the dictionary during compression. Therefore, when the dictionary's content becomes large, the compression process takes a long time and is not very efficient. The decompression rate is not influenced by the size of the dictionary content because it only has to duplicate the word strings. Overall, LZ77 is an unbalanced compression method that is not very efficient, uses more hardware and costs more. Another problem is caused by words that cannot be found in the dictionary and thus require extra effort to mark as incompressible.
Digital images are two-dimensional matrix data consisting of rows and columns and have some unique qualities from other normal data types. Focusing on these unique qualities, many zero-distortion compression methods were created for digital images. The DeltaRow Compression method compares the current row to the previous row and only compresses the different data between the two rows. The DeltaRow Compression method is simple and effective for the two-dimensional matrix data consisting of rows and columns, but does not have a high enough compression ratio for complex images such as high-resolution images.